<template>
  <el-container class="home">
    <el-header>
      <v-header></v-header>
    </el-header>
    <el-container class="main">
      <el-aside width="200px">
        <v-sidebar></v-sidebar>
      </el-aside>
      <el-main class="content">
        <router-view :key="key"></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import vHeader from "./header";
import vSidebar from "@/view/sidebar/index";

export default {
  components: {
    vHeader,
    vSidebar,
  },
  computed: {
    key() {
      return this.$route.path;
    },
  },
};
</script>

<style scoped lang="scss">
.home {
  height: 100%;
  width: 100%;
  & > .el-header {
    background: rgb(48, 65, 86);
  }
  .el-container.main {
    padding: 0;
    height: calc(100% - 60px);
    background: #f5f5f5;
    .el-aside {
      height: 100%;
      background: rgb(48, 65, 86);
      color: #fff;
    }
    .el-main {
      height: 100%;
      padding: 0;
    }
  }
}
</style>